/*
 * BoundingRectangle.h
 *
 *  Created on: Jan 21, 2011
 *      Author: Team MRF
 */

#ifndef BOUNDINGRECTANGLE_H_
#define BOUNDINGRECTANGLE_H_

#include "Shape.h"
#include <math.h>

typedef unsigned short pShort;


namespace gsp280Project2
{
	class BoundingRectangle: protected Shape
	{
	private:
		pShort width;
		pShort height;
		Vector2 BL, BR, TL, TR; //vertices of collision box

		//Vector2 CenterPoint; //FUTURE DATA-TYPE


	public:
		BoundingRectangle(); 	//C001: PRIVATE DEFAULT CONSTRUCTOR
		BoundingRectangle ( const Vector2 &vec, const pShort width, const pShort height ); //C002: OVERLOADED CONSTRUCTOR

		virtual ~BoundingRectangle() {}; 						//C003: DECONSTRUCTOR

		const pShort getHeight ( ) const;						//M001: Get Height data member
		void setHeight ( const pShort &height );				//M002: Set Height data member

		const pShort getWidth ( ) const;						//M003: Get Width data member
		void setWidth ( const pShort &width );					//M004: Set Width data member

		//==============================================
		//START: DECLARING SHAPE ABSTRACT CLASS METHODS.....
		//==============================================
		const float calcArea ( ) const;							//M005: Calculate Obj Area

		void setLocation ( const Vector2 &vect );				//M006: Set Obj Location by Vector
		void setLocation ( const float &x, const float &y );	//M007: Set Obj Location by x,y values

		void setLocation_X ( const float &x );					//M008: Set Obj Location_X
		void setLocation_Y ( const float &y );					//M009: Set Obj Location_Y

		const Vector2 getLocation() const;						//M010: Get Obj Location by Vector
		const float getLocation_X() const;						//M011: Get Obj Location_X
		const float getLocation_Y() const;						//M012: Get Obj Location_Y

		//==============================================
		//END: DECLARING SHAPE ABSTRACT CLASS METHODS.....
		//==============================================

		float float_RoundOff2 (float value);					//M013: Round float to 2 decimal places
																//FIX: MAKE NON-CLASS MEMBER FUNCTION

		const Vector2 getVertex_BL() const;						//M014: Get Bottom-Left Vertex of Obj
		void setVertex_BL( const float &x, const float &y );	//M015: Set Bottom-Left Vertex of Obj

		const Vector2 getVertex_BR() const;						//M016: Get Bottom-Right Vertex of Obj
		void setVertex_BR( const float &x, const float &y );	//M017: Set Bottom-Right Vertex of Obj

		const Vector2 getVertex_TL() const;						//M018: Get Top-Left Vertex of Obj
		void setVertex_TL( const float &x, const float &y );	//M019: Set Top-Left Vertex of Obj

		const Vector2 getVertex_TR() const;						//M020: Get Top-Right Vertex of Obj
		void setVertex_TR( const float &x, const float &y );	//M021: Set Top-Right Vertex of Obj
	};

}

#endif /* BOUNDINGRECTANGLE_H_ */
